<form id="editForm" class="panel-body form-horizontal form-padding">
						<input type="hidden"  name="#(formModelName).id" class="form-control" value="#(o?o.id:'')">
			                <div class="form-group">
			                    <label class="col-md-2 control-label">申请人</label>
			                    <div class="col-md-4">
			                    	<input type="hidden"  name="#(formModelName).userid" class="form-control"  value="#if(o)#(o.userid)#else#(user.id)#end">
			                        <input type="text"  name="#(formModelName).applyer_name" class="form-control"  value="#if(o)#(o.applyer_name)#else#(user.name)#end" readonly>
			                    </div>
			                    <label class="col-md-1 control-label">部门</label>
			                    <div class="col-md-4">
			                        <input type="hidden"  name="#(formModelName).org_id" class="form-control"  value="#if(o)#(o.org_id)#else#(org.id)#end">
			                        <input type="text"  name="#(formModelName).org_name" class="form-control"  value="#if(o)#(o.org_name)#else#(org.name)#end" readonly>
			                    </div>
			                </div>
			                <!--<div class="form-group">
			                    <label class="col-md-2 control-label">标题</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="#(formModelName).title" class="form-control"  value="#(o?o.title:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入标题</small>
			                    </div>
			                </div>-->
							<div class="form-group">
								<label class="col-md-2 control-label">物品名称</label>
								<div class="col-md-9">
									<input type="text"  name="#(formModelName).obj_name" class="form-control"  value="#(o?o.obj_name:'')" #if(view=='obj_name') readonly #end>
									<small class="help-block">请输入物品名称</small>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">规格型号</label>
								<div class="col-md-9">
									<input type="text"  name="#(formModelName).standards" class="form-control"  value="#(o?o.standards:'')" #if(view=='standards') readonly #end>
									<small class="help-block">请输入规格型号</small>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">数量</label>
								<div class="col-md-4">
									<input type="text"  name="#(formModelName).amount" class="form-control"  value="#(o?o.amount:'')" #if(view=='amount') readonly #end>
									<small class="help-block">请输入数量</small>
								</div>
								<label class="col-md-1 control-label">需求日期</label>
								<div class="input-group date form_datetime col-md-4" style="float:left">
									<input type="text" id="endTime" name="#(formModelName).use_datetime" class="form-control"  value="#(o?o.use_datetime:'')" readonly>
									<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
								</div>
							</div>
	<div class="form-group">
		<label class="col-md-2 control-label">状态</label>
		<div class="col-md-4">
			<input id="sysUserTypeReal" class="magic-radio" type="radio" name="sysUser.status" value="1" #if(o&&o.type=="1") checked #end>
			<label for="sysUserTypeReal">已购买</label>
			<input id="sysUserTypeLeave" class="magic-radio" type="radio" name="sysUser.status" value="2" #if(o&&o.type=="2") checked #end>
			<label for="sysUserTypeLeave">已发放</label>
			<input id="sysUserTypeStudy" class="magic-radio" type="radio" name="sysUser.status" value="3" #if(o&&o.type=="3") checked #end>
			<label for="sysUserTypeStudy">未购买</label>
		</div>
	</div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">用途</label>
			                    <div class="col-md-9">
									<textarea rows="8" name="#(formModelName).use_to" class="form-control" #if(view=='detail') readonly #end>#(o?o.use_to:'')</textarea>
			                        <small class="help-block">请输入用途</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">申请原因以及意见</label>
			                    <div class="col-md-9">
			                        <textarea rows="8" name="#(formModelName).des" class="form-control" #if(view=='detail') readonly #end>#(o?o.des:'')</textarea>
			                        <small class="help-block">请输入申请意见</small>
			                    </div>
			                </div>
			                <!-- <div class="form-group">
			                    <label class="col-md-2 control-label">上级领导批示</label>
			                    <div class="col-md-9">
			                        <textarea rows="8" name="#(formModelName).leader_message" class="form-control" readonly>#(o?o.leader_message:'')</textarea>
			                        <small class="help-block">请输入领导批示</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">领导批示</label>
			                    <div class="col-md-9">
			                        <textarea rows="8" name="#(formModelName).leader2_message" class="form-control" readonly>#(o?o.leader2_message:'')</textarea>
			                        <small class="help-block">请输入领导批示</small>
			                    </div>
			                </div> -->
		                	#if(view=='edit')
				            	<div class="panel-footer">
				                    <div class="row">
				                        <div class="col-sm-8 col-sm-offset-3">
				                            <button class="btn btn-warning" type="reset">重置</button>
				                            <button class="btn btn-primary" type="submit" >保存</button>
				                        </div>
				                    </div>
				                </div>
							#else

				            #end
		            </form>
<script>
	$(document).ready(function() {
		$('.form_datetime').datepicker({format: 'yyyy-mm-dd',weekStart: 1,todayBtn:  1,autoclose: 1,language:  'zh-CN',todayHighlight: 1,forceParse: 0,showMeridian: 1}).on('changeDate',function(){
			var startTime = $("#startTime").val();
			var endTime = $("#endTime").val();
			if(startTime&&endTime){
				if(!dateUtil.compareCalendar(startTime,endTime)){
					pointLion.alertMsg("开始时间大于结束时间","danger",null,null);
					$("#editForm .btn").attr("disabled","disabled");
				}else{
					resetVali();
				}
			}
		});
		$('#editForm').bootstrapValidator({
			fields: {
				"#(formModelName).amount":{
					validators:{
						digits: {
							message: '该值只能包含数字。'
						}
					}
				}
			}
		}).on("success.form.bv", function (e) {
			save();
			return false;//阻止表单跳转
		});
	});
</script>